<?php
namespace Home\Controller;
use Think\Controller;
class ShipingController extends CommonController 
{
	//
    public function index()
    {
    	//记录播放信息
    	$data['uid'] = $_SESSION['id'];
    	$data['view_time'] = time();
    	$data['view_ip'] = get_client_ip();
    	M('shiping')->add($data);
    	//播放一次 user shiping_num +1
    	$this->auto_num(user,shiping_num,$_SESSION['id'],1);

    	$num = M('user')->where(array('id'=>$_SESSION['id']))->find();
    	$this->assign('num',$num['shiping_num']);

    	//系统播放总数
    	$count = M('shiping')->count();
    	$this->assign('count',$count);

    	$this->assign('title','视频播放');
        $this->display(); 
    }






}